cmake_minimum_required(VERSION 3.22.1)

# Declares and names the project.
project("upgrade")

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)


# 源文件
add_library(
        upgrade
        SHARED
        mdfu.cpp
        ClientInfo.cpp
        uart_transport.cpp
        upgrade.cpp
        native-lib.cpp
)

# 链接 Protobuf 和 Abseil 库
target_link_libraries(
        upgrade
)

# 链接日志库
find_library(
        log-lib
        log)

target_link_libraries(
        upgrade
        ${log-lib})

